package com.mall.mapper;

import com.mall.entity.Goods;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * @author:lck
 * @Date 2024/1/15 16:18
 */

@Repository
@Mapper
public interface GoodsMapper {

    ArrayList<Goods> selectGoods(int start, int pageSize);

    int delistGoods(ArrayList<String> goodsId);
    int getDelistNum(ArrayList<String> goodsId);
    int listGoods(ArrayList<String> goodsId);

    int addGoods(Goods goods);

    long selectCounts();

    Goods selectGoodByGoodsId(String id);

    Goods getGoodsById(String goods_id);
    ArrayList<Goods> getGoodsByLike(String keyword, int start, int pageSize);
    Integer getGoodsCountsByLike(String keyword);
}
